(function(exports){"use strict";var sha1=function(){var root=(typeof window==="undefined"?"undefined":babelHelpers.typeof(window))==="object"?window:{};var NODE_JS=!root.JS_SHA1_NO_NODE_JS&&(typeof process==="undefined"?"undefined":babelHelpers.typeof(process))==="object"&&process.versions&&process.versions.node;if(NODE_JS){root=global}var COMMON_JS=!root.JS_SHA1_NO_COMMON_JS&&(typeof module==="undefined"?"undefined":babelHelpers.typeof(module))==="object"&&module.exports;var AMD=typeof define==="function"&&define.amd;var HEX_CHARS="0123456789abcdef".split("");var EXTRA=[-2147483648,8388608,32768,128];var SHIFT=[24,16,8,0];var OUTPUT_TYPES=["hex","array","digest","arrayBuffer"];var blocks=[];var createOutputMethod=function t(e){return function(t){return new Sha1(true).update(t)[e]()}};var createMethod=function t(){var e=createOutputMethod("hex");if(NODE_JS){e=nodeWrap(e)}e.create=function(){return new Sha1};e.update=function(t){return e.create().update(t)};for(var s=0;s<OUTPUT_TYPES.length;++s){var h=OUTPUT_TYPES[s];e[h]=createOutputMethod(h)}return e};var nodeWrap=function nodeWrap(method){var crypto=eval("require('crypto')");var Buffer=eval("require('buffer').Buffer");var nodeMethod=function t(e){if(typeof e==="string"){return crypto.createHash("sha1").update(e,"utf8").digest("hex")}else if(e.constructor===ArrayBuffer){e=new Uint8Array(e)}else if(e.length===undefined){return method(e)}return crypto.createHash("sha1").update(new Buffer(e)).digest("hex")};return nodeMethod};function Sha1(t){if(t){blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0;this.blocks=blocks}else{this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}this.h0=1732584193;this.h1=4023233417;this.h2=2562383102;this.h3=271733878;this.h4=3285377520;this.block=this.start=this.bytes=this.hBytes=0;this.finalized=this.hashed=false;this.first=true}Sha1.prototype.update=function(t){if(this.finalized){return}var e=typeof t!=="string";if(e&&t.constructor===root.ArrayBuffer){t=new Uint8Array(t)}var s,h=0,i,r=t.length||0,o=this.blocks;while(h<r){if(this.hashed){this.hashed=false;o[0]=this.block;o[16]=o[1]=o[2]=o[3]=o[4]=o[5]=o[6]=o[7]=o[8]=o[9]=o[10]=o[11]=o[12]=o[13]=o[14]=o[15]=0}if(e){for(i=this.start;h<r&&i<64;++h){o[i>>2]|=t[h]<<SHIFT[i++&3]}}else{for(i=this.start;h<r&&i<64;++h){s=t.charCodeAt(h);if(s<128){o[i>>2]|=s<<SHIFT[i++&3]}else if(s<2048){o[i>>2]|=(192|s>>6)<<SHIFT[i++&3];o[i>>2]|=(128|s&63)<<SHIFT[i++&3]}else if(s<55296||s>=57344){o[i>>2]|=(224|s>>12)<<SHIFT[i++&3];o[i>>2]|=(128|s>>6&63)<<SHIFT[i++&3];o[i>>2]|=(128|s&63)<<SHIFT[i++&3]}else{s=65536+((s&1023)<<10|t.charCodeAt(++h)&1023);o[i>>2]|=(240|s>>18)<<SHIFT[i++&3];o[i>>2]|=(128|s>>12&63)<<SHIFT[i++&3];o[i>>2]|=(128|s>>6&63)<<SHIFT[i++&3];o[i>>2]|=(128|s&63)<<SHIFT[i++&3]}}}this.lastByteIndex=i;this.bytes+=i-this.start;if(i>=64){this.block=o[16];this.start=i-64;this.hash();this.hashed=true}else{this.start=i}}if(this.bytes>4294967295){this.hBytes+=this.bytes/4294967296<<0;this.bytes=this.bytes%4294967296}return this};Sha1.prototype.finalize=function(){if(this.finalized){return}this.finalized=true;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block;t[e>>2]|=EXTRA[e&3];this.block=t[16];if(e>=56){if(!this.hashed){this.hash()}t[0]=this.block;t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0}t[14]=this.hBytes<<3|this.bytes>>>29;t[15]=this.bytes<<3;this.hash()};Sha1.prototype.hash=function(){var t=this.h0,e=this.h1,s=this.h2,h=this.h3,i=this.h4;var r,o,a,n=this.blocks;for(o=16;o<80;++o){a=n[o-3]^n[o-8]^n[o-14]^n[o-16];n[o]=a<<1|a>>>31}for(o=0;o<20;o+=5){r=e&s|~e&h;a=t<<5|t>>>27;i=a+r+i+1518500249+n[o]<<0;e=e<<30|e>>>2;r=t&e|~t&s;a=i<<5|i>>>27;h=a+r+h+1518500249+n[o+1]<<0;t=t<<30|t>>>2;r=i&t|~i&e;a=h<<5|h>>>27;s=a+r+s+1518500249+n[o+2]<<0;i=i<<30|i>>>2;r=h&i|~h&t;a=s<<5|s>>>27;e=a+r+e+1518500249+n[o+3]<<0;h=h<<30|h>>>2;r=s&h|~s&i;a=e<<5|e>>>27;t=a+r+t+1518500249+n[o+4]<<0;s=s<<30|s>>>2}for(;o<40;o+=5){r=e^s^h;a=t<<5|t>>>27;i=a+r+i+1859775393+n[o]<<0;e=e<<30|e>>>2;r=t^e^s;a=i<<5|i>>>27;h=a+r+h+1859775393+n[o+1]<<0;t=t<<30|t>>>2;r=i^t^e;a=h<<5|h>>>27;s=a+r+s+1859775393+n[o+2]<<0;i=i<<30|i>>>2;r=h^i^t;a=s<<5|s>>>27;e=a+r+e+1859775393+n[o+3]<<0;h=h<<30|h>>>2;r=s^h^i;a=e<<5|e>>>27;t=a+r+t+1859775393+n[o+4]<<0;s=s<<30|s>>>2}for(;o<60;o+=5){r=e&s|e&h|s&h;a=t<<5|t>>>27;i=a+r+i-1894007588+n[o]<<0;e=e<<30|e>>>2;r=t&e|t&s|e&s;a=i<<5|i>>>27;h=a+r+h-1894007588+n[o+1]<<0;t=t<<30|t>>>2;r=i&t|i&e|t&e;a=h<<5|h>>>27;s=a+r+s-1894007588+n[o+2]<<0;i=i<<30|i>>>2;r=h&i|h&t|i&t;a=s<<5|s>>>27;e=a+r+e-1894007588+n[o+3]<<0;h=h<<30|h>>>2;r=s&h|s&i|h&i;a=e<<5|e>>>27;t=a+r+t-1894007588+n[o+4]<<0;s=s<<30|s>>>2}for(;o<80;o+=5){r=e^s^h;a=t<<5|t>>>27;i=a+r+i-899497514+n[o]<<0;e=e<<30|e>>>2;r=t^e^s;a=i<<5|i>>>27;h=a+r+h-899497514+n[o+1]<<0;t=t<<30|t>>>2;r=i^t^e;a=h<<5|h>>>27;s=a+r+s-899497514+n[o+2]<<0;i=i<<30|i>>>2;r=h^i^t;a=s<<5|s>>>27;e=a+r+e-899497514+n[o+3]<<0;h=h<<30|h>>>2;r=s^h^i;a=e<<5|e>>>27;t=a+r+t-899497514+n[o+4]<<0;s=s<<30|s>>>2}this.h0=this.h0+t<<0;this.h1=this.h1+e<<0;this.h2=this.h2+s<<0;this.h3=this.h3+h<<0;this.h4=this.h4+i<<0};Sha1.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,s=this.h2,h=this.h3,i=this.h4;return HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[s&15]+HEX_CHARS[h>>28&15]+HEX_CHARS[h>>24&15]+HEX_CHARS[h>>20&15]+HEX_CHARS[h>>16&15]+HEX_CHARS[h>>12&15]+HEX_CHARS[h>>8&15]+HEX_CHARS[h>>4&15]+HEX_CHARS[h&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]};Sha1.prototype.toString=Sha1.prototype.hex;Sha1.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,s=this.h2,h=this.h3,i=this.h4;return[t>>24&255,t>>16&255,t>>8&255,t&255,e>>24&255,e>>16&255,e>>8&255,e&255,s>>24&255,s>>16&255,s>>8&255,s&255,h>>24&255,h>>16&255,h>>8&255,h&255,i>>24&255,i>>16&255,i>>8&255,i&255]};Sha1.prototype.array=Sha1.prototype.digest;Sha1.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(20);var e=new DataView(t);e.setUint32(0,this.h0);e.setUint32(4,this.h1);e.setUint32(8,this.h2);e.setUint32(12,this.h3);e.setUint32(16,this.h4);return t};return createMethod()}();exports.sha1=sha1})(this.BX=this.BX||{});
//# sourceMappingURL=sha1.bundle.map.js